﻿<storeControls:StoreApplicationPage x:Class="Store.WP7.Views.ProductsView"
                                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                                    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                                    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                                    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                                    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                                    xmlns:storeControls="clr-namespace:Store.WP7.Controls;assembly=Store.WP7.Controls"
                                    xmlns:behaviors="clr-namespace:Store.WP7.Framework.Interactions;assembly=Store.WP7.Framework"
                                    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
                                    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
                                    FontFamily="{StaticResource PhoneFontFamilyNormal}"
                                    FontSize="{StaticResource PhoneFontSizeNormal}"
                                    Foreground="{StaticResource PhoneForegroundBrush}"
                                    SupportedOrientations="Portrait"
                                    Orientation="Portrait"
                                    mc:Ignorable="d"
                                    d:DesignHeight="768"
                                    d:DesignWidth="480"
                                    DataContext="{Binding ProductsViewModel, Source={StaticResource ViewModelLocator}}">

    <i:Interaction.Behaviors>
        <behaviors:SystrayBehavior SystrayOpacity="0.5"
                                   IsBusy="{Binding IsBusy}"
                                   BusyMessage="{Binding BusyMessage}" />
    </i:Interaction.Behaviors>

    <Grid x:Name="LayoutRoot">
        <!--<Grid.Background>
            <ImageBrush Stretch="None" ImageSource="/Assets/Images/PageBackground.png" />
        </Grid.Background>-->

        <Image Stretch="UniformToFill"
               Source="/Assets/Images/PageBackground.png" />

        <Grid x:Name="ContentPanel"
              Grid.Row="1"
              Margin="24,150,12,0">
            <ListBox ItemsSource="{Binding Products}"
                     ItemTemplate="{StaticResource ProductSummaryDataTemplate}"
                     SelectedItem="{Binding SelectedProduct, Mode=TwoWay}"
                     x:Name="ProductsListBox">
                <i:Interaction.Behaviors>
                    <behaviors:ContinuumMasterBehavior />
                </i:Interaction.Behaviors>
            </ListBox>
        </Grid>
    </Grid>
</storeControls:StoreApplicationPage>